<?php

// +----------------------------------------------------
// | Name: 星空框架  分红规则验证
// +----------------------------------------------------
// | Version: V5.0
// +----------------------------------------------------
// | Author: xkyinzhe <zhonghuaxinxing@sina.cn>
// +----------------------------------------------------
// | Time： 2021-05-07 13：01
// +----------------------------------------------------
declare(strict_types=1);

namespace app\common\validate;

use think\Validate;

/**
 * @xk 分红规则验证
 */
class BonusRule extends Validate
{
    protected $rule = [
      'bonus_rule_id' => 'require|number',
      'all' => 'require|float|between:0,9999999999999999.99',
      'bonus_bili' => 'require|float|between:0,1',
  ];
    protected $message = [
      'bonus_rule_id' => '请选择需要调整的分红规则',
      'all' => '请输入需要团队业绩',
      'bonus_bili' => '请输入0-1之间的数字作为分红比例',
  ];
  protected $scene = [
    'create' => ['all','bonus_bili'],
    'edit' => ['bonus_rule_id','all','bonus_bili'],
  ];
}
